From: Keir Fraser Date: Fri, 7 Aug 2009 16:31:27 +0000 (+0100) Subject: tools: Fix iptables failure test in vif-common.sh X-Git-Tag: archive/raspbian/4.8.0-1+rpi1~1^2~13501 X-Git-Url: https://dgit.raspbian.org/%22http://www.example.com/cgi/success//%22http:/www.example.com/cgi/success/?a=commitdiff_plain;h=37541c41651ee9b29ffeda3870cb3ba704d7e756;p=xen.git tools: Fix iptables failure test in vif-common.sh In changset 19540 a bug was introduced in the fib_iptable function in vif-common.sh that incorrectly checks the exit status of iptables -- it always believes iptables has failed even when it hasn't. The attached patch fixes that. It's also bug 1490. Signed-off-by: John Haxby --- diff --git a/tools/hotplug/Linux/vif-common.sh b/tools/hotplug/Linux/vif-common.sh index fe483f9dc9..44dd342acf 100644 --- a/tools/hotplug/Linux/vif-common.sh +++ b/tools/hotplug/Linux/vif-common.sh @@ -78,7 +78,7 @@ frob_iptable() iptables "$c" FORWARD -m state --state RELATED,ESTABLISHED -m physdev \ --physdev-out "$vif" -j ACCEPT 2>/dev/null - if [ "$command" == "online" ] && [ $? ] + if [ "$command" == "online" -a $? -ne 0 ] then log err "iptables setup failed. This may affect guest networking." fi